#include <linux/module.h>
#include <linux/platform_device.h>
#include "plt_data.h"

static int plt_probe(struct platform_device *pdev)
{
	struct resource *res;
	struct plt_plat_data *plt_data;

	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
	printk("Type: %d, num: %d, start: %llu, end: %llu\n", IORESOURCE_IRQ, 0, res->start, res->end);

	plt_data = dev_get_platdata(&pdev->dev);
	printk("num: %d, size: %d\n", plt_data->num, plt_data->size);

	printk("%s\n", __FUNCTION__);

	return 0;
}

static int plt_remove(struct platform_device *pdev)
{
	printk("%s\n", __FUNCTION__);

	return 0;
}

static struct platform_driver plt_drv = {
	.probe	= plt_probe,
	.remove	= plt_remove,
	.driver = {
		.name	= "plt",
		.owner	= THIS_MODULE,
	},
};

module_platform_driver(plt_drv);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("YYW");

